﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/****************************************************************
*   类名：ImageParameters
*   命名空间：CommonModule
*   作者：X
*   CLR版本：4.0.30319.42000
*   创建时间：2022/3/15 10:16:45
*   描述说明：
*   修改历史：
*****************************************************************/
namespace CommonModule
{
    /// <summary>
    /// 图片预处理参数
    /// </summary>
    public class ImageParameters
    {
        private double scaleMin;
        private double scaleMax;
        private double thresholdMin;
        private double thresholdMax;
        private double areaMin;
        private double areaMax;

        public double ScaleMin { get => scaleMin; set => scaleMin = value >= 0 && value <= 255 ? value : 0; }
        public double ScaleMax { get => scaleMax; set => scaleMax = value >= 0 && value <= 255 ? value : 255; }
        public double ThresholdMin { get => thresholdMin; set => thresholdMin = value >= 0 && value <= 255 ? value : 0; }
        public double ThresholdMax { get => thresholdMax; set => thresholdMax = value >= 0 && value <= 255 ? value : 255; }
        public double AreaMin { get => areaMin; set => areaMin = value >= 0 && value <= 100000 ? value : 0; }
        public double AreaMax { get => areaMax; set => areaMax = value >= 0 && value <= 100000 ? value :100000; }
    }
}
